Add localized C++ hover size and alignment text - #14797
Colen Garoutte-Carson (Colengms) wants to merge 3 commits into
Conversation
Keep size and alignment labels fully localizable while selecting singular and plural byte forms independently. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…nto dev/coleng/size_and_alignment
| }, | ||
| "quick_info_size_many": { | ||
| "text": "**Size:** %s bytes", | ||
| "hint": "Size of a C or C++ type when the size is not one byte. %s is the size. {Locked=\"**\"} {Locked=\"%s\"}" |
There was a problem hiding this comment.
✨Copilot (agent224): [Minor] The *_many hints specify this template for every value other than 1, including the alignment pair below. We ship Czech, Polish, and Russian, where the byte unit differs for 2–4 versus 5+ (for example, Polish 2 bajty versus 5 bajtów; Czech 2 bajty versus 5 bajtů). One non-one template cannot express both forms when the native hover selects by == 1. Could we select locale-aware cardinal plural forms for the byte unit, or use a count-invariant localized abbreviation/wording, before consuming these strings?
There was a problem hiding this comment.
✨Copilot (agent224): I also checked the pre-existing nativeStrings.json entries. On main, files_removed_from_database and parsing_files_processed each interpolate an arbitrary file count into one template; with 1, the checked-in Spanish and Brazilian Portuguese versions would render 1 archivos / 1 arquivos instead of 1 archivo / 1 arquivo. These entries predate your PR, and I have not verified which counts the native callers emit. Would you prefer to include a fix for these older cases in this PR, or have me investigate their callers and address any confirmed cases in a separate follow-up PR after this one merges?
Adds the native localized Markdown template used to display C++ type size and alignment in hover.
This is the localization companion to a native cpptools implementation.